package com.liujit.bms.app.fallback;

import com.liujit.bms.app.api.BmsAppFeignClient;
import com.liujit.bms.app.domain.model.BlogMember;
import com.liujit.bms.app.domain.params.BlogMemberParams;
import com.liujit.common.domain.result.Result;
import com.liujit.common.enums.ResultCode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author: liujun
 * @date: 2021/6/21 10:14 下午
 * @description: 博客服务远程调用异常
 */
@Slf4j
@Component
public class BmsAppFeignFallbackClient implements BmsAppFeignClient {

    @Override
    public Result<BlogMember> getByOpenId(String openId) {
        log.error("feign远程调用博客服务异常后的降级方法");
        return Result.failure(ResultCode.INTERFACE_OUTER_INVOKE_ERROR);
    }

    @Override
    public Result<BlogMember> addMember(BlogMemberParams params) {
        log.error("feign远程调用博客服务异常后的降级方法");
        return Result.failure(ResultCode.INTERFACE_OUTER_INVOKE_ERROR);
    }
}
